KERNELDIR:=/lib/modules/$(shell uname -r)/build
PWD:=$(shell pwd)
# SRC_FILES:=$(wildcard *.c)
# OBJ_FILES:=$(patsubst %.c,%.o,$(SRC_FILES))
# MODULES:=$(patsubst %.c,%.ko,$(SRC_FILES))

obj-m += dys.o

# obj-m += temp.o
# temp-objs := tempko.o

# dmdedup_m-objs := dmdedup.o rwfile.o utils.o
dys-objs := dys_dedup.o rwfile.o utils.o

all:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
	mv *.ko ./build
	rm modules.order Module.symvers
	rm *.o .*.cmd
	rm *.mod*

clean:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean

.PHONY: all clean